﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
using UnityEngine;

namespace Warensoft.Unity.Communication.Client.Internals
{
    internal static class ThreadManager
    {

        private static Queue<Action> waitForWWWQueue = new Queue<Action>();
        private static int maxThreadCount;

        public static int MaxThreadCount
        {
            get { return maxThreadCount; }
            set { maxThreadCount = value; }
        }

        private static int currentThreadCount;

        public static int CurrentThreadCount
        {
            get { return currentThreadCount; }
            set { currentThreadCount = value; }
        }

        static ThreadManager()
        {
            MaxThreadCount = 20;
            CurrentThreadCount = 0;
        }
        static void BeginGetWWW(Action callback)
        {
            waitForWWWQueue.Enqueue(callback);
        }
        public static void WaiteThread()
        {
            System.Threading.ManualResetEvent m = new System.Threading.ManualResetEvent(true);
            
        }
    }
}
